package com.example.springpethospital.entity.file.dto;

import com.amazonaws.services.s3.model.PartSummary;
import com.example.springpethospital.entity.file.po.UploadTaskPO;
import com.google.common.collect.Lists;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.beans.BeanUtils;

@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
public class UploadTaskDTO extends UploadTaskPO {

    /**
     * 已上传完的分片
     */
    private List<PartSummary> exitPartList;

    public UploadTaskDTO(UploadTaskPO po) {
        BeanUtils.copyProperties(po, this);
        this.exitPartList = Lists.newArrayList();
    }
}
